function $(id){return document.getElementById(id)}
window.onload = function (){
    $("ipt1").addEventListener("click",function (){
        $("div1").className = "xian";
        $("div2").className = "yin";
    })

    $("ipt2").addEventListener("click",function (){
        $("div2").className = "xian";
        $("div1").className = "yin";
    })
    $("but1").addEventListener("click",function () {
        //var str=div1.getElementsByClassName()
        if($("div1").className=="xian")
        {
            $("bot").className="xian";
            $("div3").className="xian";
            $("div4").className="yin";
            var t1=$("t1").value;
            $("t4").value=t1*(1+0.056);
            $("t3").value=t1*0.056;
            $("t2").value=$("t4").value/6;
        }
        else{
            $("bot").className="xian";
            $("div4").className="xian";
            $("div3").className="yin";
            var t11=$("t11").value;
            $("t44").value=(t11*0.01);
            $("t33").value=(t11*0.01);
            $("t55").value=300;
            $("t66").value=1000;
            $("t22").value=(2*(t11*0.01)+1000+300);

        }

    })
}